package com.dfs.parent.common.web.config;

import com.dfs.parent.common.web.handle.GlobalExceptionHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;

/**
 * @Description 异常处理
 * @Author dahong
 * @Date 2024/2/23 05:50
 *
 * 报错
 * Description:
 *
 * The bean 'globalExceptionHandler', defined in class path resource [com/dfs/parent/common/web/config/ExceptionAutoConfiguration.class], could not be registered. A bean with that name has already been defined in file [/Users/hong/work/dfs/dfs-common/dfs-common-web/target/classes/com/dfs/parent/common/web/handle/GlobalExceptionHandler.class] and overriding is disabled.
 *
 * Action:
 *
 * Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
 *
 *
 * 解决方案：
 * // 移除 @Component 或 @ControllerAdvice
 * // @ControllerAdvice // ❌ 注释掉
 * public class GlobalExceptionHandler { ... }
 */
//@Slf4j
//public class ExceptionAutoConfiguration {
//    @Bean
//    public GlobalExceptionHandler globalExceptionHandler(){
//        return new GlobalExceptionHandler();
//    }
//}
